home *** CD-ROM | disk | FTP | other *** search
- ┌───────────────────────────┐
- │ Additional Macro Examples │
- └───────────────────────────┘
-
- This file contains a number of sample macros. Feel free to copy any of them
- to COMMO.MAC and to alter them to your own needs. Additions will be made to
- this file as time permits. Thanks to the users for their contributions.
-
- {COMMO} macros can be made to do many amazing things besides just logging into
- BBS's and doing mail runs (those are indeed popular functions, however). Some
- of the simplest macros demonstrate this capability.
-
-
- The next two macros are used for reading messages. They use the grey plus
- and minus keys in the lower right corner of the keyboard. The first one sends
- a <cr>, then clears the screen. Makes messages a lot easier to read since
- each one starts displaying at the top of the screen. The second macro just
- sends a <cr>. Nice for keyboards without the extra enter key.
-
- Message reading macros
- ───────────────────────────────────────────────────────────────────────────
- {gr+} {send |} {clear} {}
- {gr-} {send ^M} {}
-
-
- Start my mail reader after a mail run
- ───────────────────────────────────────────────────────────────────────────
- {cF4} {exen slmr} {} SLMR
-
-
- My generic login macro will login to most popular BBS's. The generic login
- subroutine can be called from mail run macros, etc. The GOLOok with the
- ";passwor" ignores the string "password" in the opening instructions on an
- Auntie board.
-
- Generic login macro
- ───────────────────────────────────────────────────────────────────────────
- {...} {capture y,c:\commo\commo.cap} RBBS, PCBoard, Auntie, etc.
- {asci ,} {call gls} {}
-
- Generic login subroutine
- ───────────────────────────────────────────────────────────────────────────
- {gls} {setlook 60,hng}
- {li1} {golook li4,graphics} {golook li2,first name}
- {golook li3,last name} {golook li4,correct} {golook li1,;passwor}
- {lookfor password} {send ~#|} {return}
- {li2} {send ~Fred|} {goto li1}
- {li3} {send ~Brucker|} {goto li1}
- {li4} {send ~y|} {goto li1}
-
-
- Motherboard mail run
- ───────────────────────────────────────────────────────────────────────────
- {mot} {capture y,c:\commo\mother.cap} {asci ,}
- {setlook 90,hng} {lookfor (enter)=no} {send n q ns|}
- {call gls} {setlook 60,hng,3,n|}
- {lookfor board command?} {setlook 90,hng} ═ turn off prompt timer
- {send open 8|} {look markmail command?}
- {ifexist c:\ul\julie.rep,,mb1} {send u|}
- {lookfor ^xB01} {execute DSZ port %p sz -m %u\julie.rep}
- {lookfor command?}
- {mb1} {send dg|} {golook mb2,no messages found}
- {lookfor ^xB00} {call .z.} {goto ncr}
- {mb2} {send g|}
- {ncr} {setlook 20} {lookfor no carrier} {return}
-
-
- Here's my latest whizbang quoting macro. It changes the Screen Image file to
- a temporary file, then goes into Scrollback. In Scrollback I write a block
- of text to the Screen Image file (the quote), then exit. My editor (QEdit)
- is then executed on the temporary file. I do what I need there to dress up
- the quote (like add quoting marks, etc.). When I save the file and exit the
- editor, the macro does an ASCII Upload of the file, deletes it and restores
- the Screen Image filename to what it was before.
-
- Quoting macro
- ───────────────────────────────────────────────────────────────────────────
- {cf6} {screen n,c:\dl\temp} {scroll} {exen q c:\dl\temp} {asci c:\dl\temp}
- {exen del c:\dl\temp} {screen n,c:\commo\commo.scn} {}
-
-
- The following macro can be executed from the command line with the switch
- "/m=dda". It will login to Directory Assistance RBBS, read and capture all
- messages in the MAIN, COMMO and COMM conferences, download ANYFILE.ZIP, then
- logoff. After 50 dialing tries it will give up and beep twice.
-
- (put "dir" in the Dialing Directory macro field)
- ───────────────────────────────────────────────────────────────────────────
- {dda} {mark direc} {dial 50,bp2} {alarm 3} {}
- {bp2} {beep} {beep} {}
-
- {dir} {capture y,c:\commo\direc.cap} {asci ,:}
- {setlook 60,hng,3,n|}
- {lookfor first name?} {send Fred Brucker|~#|}
- {call di1}
- {setlook ,,3,|}
- {call di2} {call di1}
- {send j commo|}
- {call di2} {call di1}
- {send j comm|}
- {call di2} {call di1}
- {send j main|} {call di1}
- {send d;anyfile.zip;z|}
- {execute dsz port %p rz} {call di1}
- {send g|} {capture n} {goto ncr}
-
- {di1} {lookfor your command?} {return}
- {di2} {send r s c|} {lookfor [q]uit} {return}
-
-
- This macro is a mini host mode. It will answer on the first ring, send a
- welcome message, wait for a password, then execute the batch file HOST.BAT.
- When you exit back to DOS it will hang up and recycle for the next call. A
- simple version of HOST.BAT might be:
-
- ctty com%1
- command
-
- Instead of CTTY you could use a program such as DoorWay by Marshall Dudley
- (available as Shareware).
- ───────────────────────────────────────────────────────────────────────────
- {hos} {capture y,c:\commo\host.cap} {localecho y}
-
- {hs1} {setlook 0} {lookfor ring} {send ~~~ata|}
- {golook hs2,CONNECT 1200}
- {lookfor CONNECT 2400}
- {parms 2400,8} {goto hs3}
- {hs2} {parms 1200,8}
-
- {hs3} {pause 2}
- {send ^L Welcome!!!|^J^J Enter password: }
- {setlook 5,hs4}
- {lookfor f} {send .} Put your password here
- {lookfor r} {send .} (my password is "fred|", | is a cr)
- {lookfor e} {send .}
- {lookfor d} {send .}
- {lookfor |}
- {send |^J^J^J Login complete.|^J^J Calling host, please wait ...}
- {execute c:\commo\host %p}
- {hs4} {pause 1} {hangup y} {goto hs1}
-
-